<?php

namespace catchAdmin\pc\model;

class News extends \catchAdmin\model\News
{


    public $name = 'news';


    public function saveData($param)
    {
        return parent::saveDataCC([
            'title'         => $param['title'],
            'content'       => $param['content'],
            'news_class_id' => $param['news_class_id'] ?? 0,
            'cover'         => $param['cover'] ?? '',
            'sort'          => $param['sort'] ?? 0,
            'fa_name'       => $param['fa_name'] ?? '',
        ]);
    }


    public function indexData($param)
    {
        $app = $this->with([
            'newsClass',
        ]);

        return $this->indexDataPcCC($param, $app);
    }

}
